<?php

namespace App\Http\Requests;

class ResourceCategoryCreateRequest extends BaseRequest
{
    /**
     * Get the validation rules that apply to the request.
     * @return string[]
     */
    public function rules(): array
    {
        return [
            'name' => ['required','unique:admin_resource_categories'],
        ];
    }

    public function messages(): array
    {
        return [
            'name.required' => '资源分类名称不能为空',
            'name.unique' => '资源分类名称已存在',
        ];
    }
}

